package data;

import java.util.ArrayList;

public class VipData extends Data{
	private static final long serialVersionUID = 1L;
	ArrayList<VipRecord> vipList=new ArrayList<VipRecord>();
	public VipData(){
		
	}
	public void addVip(VipRecord record){
		vipList.add(record);
	}
	public VipRecord getVipByID(String ID){
		if(vipList.size()==0) return null;
		for(int i=0;i<vipList.size();i++){
			if(vipList.get(i).getID()==ID) return vipList.get(i);
		}
		return null;
	}
	public void removeVip(String ID){
		
	}
	public Object[][] getTable(){
		Object[][] object = new Object[vipList.size()+1][3];
		for(int i=0;i<vipList.size();i++){
			object[i] = vipList.get(i).toString().split(",");
		}
		
		return object;
		
	}

}
